1. Field of the Invention
The present invention relates to a digital filter for use in, for example, filtering of image data or the like.
2. Description of the Prior Art
A filter of symmetric coefficients having linear phase characteristic is generally employed as a finite impulse response or FIR digital filter. For the filter coefficients of the FIR digital filter, in general, a value of the coefficient of the central tap is large and values of the coefficients at the ends are small. Therefore, when the filter operations are performed using multipliers of the same input word length while aligning the digits, in the case of the filter operation using a small filter coefficient for an output of the tap at the end, the operation word length of the multiplier cannot be effectively used, so that the operation word length becomes vain.
Practically speaking, in the case where a numeric value is expressed by a fixed point method whereby a sign bit is expressed by the MSB and a decimal point appears immediately after the MSB, when the word length of a coefficient h.sub.1 of a large value assumes m bits, the effective word length of a coefficient h.sub.2 of a small value is n bits, which are smaller than the word length of the coefficient h.sub.1. Thus, (m-n) bits corresponding to the difference between the word lengths of the coefficients h.sub.1 and h.sub.2 become the vain word length. Assuming that the input word length of the multiplier is m bits and an input data x.sub.1 is m bits, the case of multiplying the data x.sub.1 by the coefficients h.sub.1 and h.sub.2, respectively, will be now considered. In the multiplication of the input data x and the coefficient h.sub.1 of a large value, both word lengths of the input data x.sub.1 and the coefficient h.sub.1 are equal to the input word length of the multiplier, so that the operation word length does not become vain. In the multiplication of the input data x.sub.1 and the coefficient h.sub.2 of a small value, however, the effective word length of the coefficient h.sub. 2 is expressed by n bits smaller than m bits of the input word length of the multiplier, so that (m-n) bits become the vain word length. Consequently, in the case where the output data of the taps which are multiplied by the coefficients in this manner are added the portions of the respective high order bits become the vain word lengths.
To prevent such vain word lengths, such constitution that the digits of the outputs of the taps are aligned as mentioned above is not used but another method is considered in the multiplication of the input data x.sub.1 and the coefficient h.sub.2 whereby the coefficient h.sub.2 of a small value is shifted by (m-n) bits to the higher order so as to be increased by 2.sup.(m-n) times and supplied to the multiplier. In this way, by scaling the coefficient h.sub.2 of a small value and supplying it to the multiplier the effective word length of the coefficient becomes long and the multiplication output of the multiplier becomes all effective bits, so that the vain operation word length is eliminated.
However, the outputs of the taps which are multiplied by the scaled coefficients- respectively have a drawback such that their .digits are not aligned by the amounts commensurate with the scaling. Therefore, it is necessary upon addition to shift the multiplied outputs of the respective taps by the amounts commensurate with the scaling so as to align their digits and then add those shifted outputs.
As described above, by supplying the scaled coefficients as inputs for multiplication, the vain operation word length is eliminated in the case where the FIR digital filter is constituted providing the multipliers of the same word length for the respective taps. However, since the filter coefficients differ for every characteristic of the filter, amounts of scaling of the multipliers also differ for every characteristic of the filter. In the case of realizing the digital filter in which the scaled coefficients are supplied as inputs for multiplication as mentioned above, different hardware must be provided for every characteristic of the digital filter, which is generally constituted by a hard-wired system for processing an image signal or the like, since the addition after the multiplication is accompanied by a bit shifting operation.